// dlg.txt

//	mark_quest_dest(zone,x,y,layer,quest);
//	cancel_out_fight(0,short kill_enc)
//	make_outdoor_enc(short x,short y,short which_enc);
//	set_out_fight_field(short which_field);

begintalkscript;

variables;

short this_sec = 66;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "You are close to [F3], one of Haven's forts in the Low Dhaga. As you get closer, you feel safer. Haven's forts are considered Haven land, and even the most crazed raider will think three times before trespassing there.";
	text2 = "Then again, the raiders of the Ro were mad enough to attack you personally, and many of those raiders (if not all) came from the Low Dhaga. Caution is still wise.";
	text3 = "The fort looks neglected, which is the usual state of affairs for Haven's forts in the Rokaj. It will be interesting to hear the excuses the chief here comes up with.";
	code =
		sf(100 + this_sec,1,1);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "You find a small supply cache, half-buried in the sand near the riverbank. It was probably left here by raiders, a big, sandy pile of stolen goods.";
	text2 = "Most of the boxes contain tools and supplies. Nothing you don't already have plenty of. In one of the boxes, among some iron bars, you find an ingot of a strange, silvery metal. Seems worth keeping.";
	code =
		sf(100 + this_sec,2,1);
		change_crafting(0,0,0,1,0);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The raiders have been slain. Alas, the Low Dhaga has a nearly limitless supply of them.";
	text2 = "You search their packs, looking for evidence of what clan sent them. You find nothing. They weren't foolish enough to carry evidence with them.";
	text3 = "You do find a small pouch, though. It contains a handful of gemstones and a large, glittering crystal.";
	code =
		change_coins(58,TRUE);
				change_crafting(1,0,0,0,0);
	break;

begintalknode;
	tag = 14;
	condition = gf(166,12) == 0;
	text1 = "A patrol of Havenite soldiers salutes smartly as you pass. They march in tight formation, and their weapons and armor are quality and properly maintained.";
	text2 = "At least someone remembered that the Low Dhaga is very dangerous.";
	code =
		sf(166,12,1);
	break;
	
begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = gf(166,8) == 0;
	question = "Name";
	text1 = "You find a small mining claim. It's just a dozen workers, wielding picks and short swords. They're digging around in some old shafts, looking for undiscovered crystals or seams of deep metal.";
	text2 = "When you walk up the road, they emerge from the pit to greet you. Their weapons aren't drawn, but they are not happy to have visitors.";

begintalknode;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "Approach them.";
	text1 = "When you try to greet them, you find them grim and taciturn. You can barely get any information from them. They're from a clan to the north. They are looking for crystals.";
	text2 = "That is all they are willing to say.";
	text3 = "Then one of them starts to look a little guilty. He says, _We saw you fight the raiders. We are grateful. We owe you hospitality._";
	code =
		if (gf(166,9) == 0)
			rs(3);
			else rs(2);
	break;
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(166,9) > 0;
	question = "Depart.";
	text1 = "You leave them to their work. Happily, you encounter no raiders as you leave.";
	action = END_TALK;
	
begintalknode;
	state = 10;
	nextstate = 13;
	condition = gf(166,9) == 0;
	question = "Depart.";
	text1 = "They watch quietly as you leave. You head back along the road to the east.";
	text2 = "A sudden, hot wind picks up. Soon, there is sand flying everywhere. It is hard to see.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Are you allowed to be here?_";
	text1 = "They explain that this is an abandoned claim, and thus they are legally allowed to be here. They probably won't stay for long. They haven't found anything of value, and they are worried about raiders.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_Have anything worth selling?_";
	text1 = "They absolutely do not.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = gf(166,9) > 0;
	question = "Enjoy their hospitality.";
	text1 = "You sit around a low fire. They provide tea with sand in it and bread with sand in it. It's paltry fare, but it's what they have.";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = gf(166,9) > 0;
	question = "Depart.";
	text1 = "They stand at attention as you leave. It is the nicest they have been.";
	action = END_TALK;

begintalknode;
	state = 11;
	nextstate = 13;
	condition = gf(166,9) == 0;
	question = "Depart.";
	text1 = "They watch quietly as you leave. You head back along the road to the east.";
	text2 = "A sudden, hot wind picks up. Soon, there is sand flying everywhere. It is hard to see.";

begintalknode;
	state = 13;
	nextstate = 14;
	condition = 1;
	question = "Keep walking.";
	text1 = "You struggle against the wind and sand and walk east. Visibility is miserable, which is why you don't see the raiders until you stumble into them. There are eight of them.";
	text2 = "They are sneaking toward the mining camp to the west, weapons drawn. When they see who you are, they stand to the side. They're waiting for you to pass so they can continue their bloody business.";
	code =
		sf(166,9,2);
	break;
	
begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "_Who are you?_";
	text1 = "The raiders don't respond. They just wave you by. Their faces are covered and your eyes are full of sand, so you can't read their expressions.";

begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Attack them.";
	text1 = "You give the raiders a bit of Haven justice. They are barely able to comprehend the infinite extent of their bad luck before you are upon them.";
	action = END_TALK;
	code =
		make_outdoor_enc(329,325,0);
		sf(166,9,1);
	break;
	
begintalknode;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "Let them go.";
	text1 = "You let the raiders pass. They will be breaking the laws of Haven, but nobody will know. Bad luck for the rude miners.";
	action = END_TALK;
	code =
		sf(166,8,1);
	break;

	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				